package com.jeespring.admin.controller;

import com.jeespring.common.pojo.TreeNode;
import com.jeespring.admin.service.ResourceService;
import com.jeespring.common.pojo.TreeNode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @title:
 * @description:
 * @author: 张朝阳
 * @date: 2019/5/1 00:12
 */

@Controller
@RequestMapping("/resource")
public class ResourceController {

    @Autowired
    private ResourceService resourceService;

    @RequestMapping("/query/list")
    public List geResourceList(){
        return null;
    }

    @RequestMapping("/query/menu")
    @ResponseBody
    public List queryMenu(Model model){
        List<TreeNode> menuList = resourceService.getMenuList();
        return menuList;
    }

}
